﻿using System;
using System.IO;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Noria.Web.MyMSDN;
using Noria.Web.Utility;

namespace Noria.Web.Test
{
    [TestClass]
    public class GZipTest
    {
        [TestMethod]
        public void GZipTestMethod()
        {
            //var ss = File.ReadAllBytes(@"K:\web\my.log");

            var ss = "Hello world. Today is my birthday, I'm very happy.";
            var cc = GZipHelper.Compress(ss);
            var tt = Encoding.UTF8.GetString(GZipHelper.Decompress(cc));
            //var tt = GZipHelper.Decompress(cc);

            Assert.AreEqual(ss, tt);
        }
    }
}
